<?php
namespace app\admin\model;

use think\facade\Request;
use think\Model;

class LoginLog extends Model{
	
    protected $table = 'login_log';
    protected $insert = [
        'ip','user_agent'
    ];

    public function setIpAttr()
    {
        return Request::ip();
    }

    public function setUserAgentAttr()
    {
        return Request::header('User-Agent');
    }

}